package com.zzw.thread;

public class YiledThread extends Thread{

	public YiledThread(String name){
		super(name);
	}
	
	@Override
	public void run(){
		for(int i = 0;i < 20;i++){
			System.out.println(getName() + " " + i);
			if(i == 10){
				Thread.yield();
			}
		}
	}
	
	public static void main(String[] args) {
		YiledThread yiledThread = new YiledThread("�߼�");
		yiledThread.start();
		YiledThread thread = new YiledThread("�ͼ�");
		thread.start();
	}
}
